<?php
class App_Module_Admin_Component_Media_Ctrl_Std_Cli extends App_Module_Admin_Component_Media_Ctrl_Http
{
    /**
		экшен по-умолчанию
	*/
    public function PrAction ()
    {
        $this->confirm_filePr();
    }

    public function confirm_filePrAction()
    {
    	$code = Mozg::Request('std')->get('code');
    	if (Mozg_Mapper::Get('Media')->ApproveMediaByCode($code))
    	{
    		$response = 'Media file approved';
    	}
    	else
    	{
    	    if (Mozg_Mapper::Get('Media')->IsError())
        	{
        		$response = Mozg_Mapper::Get('Media')->GetErrorMessage();
        	}
        	else
        	{
				$response = 'Error occured with media file';
        	}
    	}
    	
    	Mozg::Response('std')->SetBody($response);
    }
}